(1) Field of the Invention
The present invention relates to a compiler that translates a source program described in a high-level language such as C language into a machine language program and particularly to a directive concerning a compiler optimization.
(2) Description of the Related Art
A conventional compiler is made mainly for control processing applications. As for the control processing applications, precise execution performance and tuning of a code size is not required so much; rather from the viewpoint of reducing development man-hours, a user gives only rough directives (an option and the like designated at the time of compiling) such as “A higher priority on performance”, “A higher priority on a code size”, or “Balance between performance and a code size” and leaves most of the optimization strategy to a compiler.
On the other hand, in the field of media processing applications where critical execution performance and a critical code size are required, development is made aiming firstly to realize required performance and a required code size by executing a hand coding by an assembly language.
In recent years, however, the development man-hours have increased by enlargement and diversification of the media processing applications, and application development by a high-level language is also required in the media processing field. As a result, an attempt is made to realize the development of media processing application by a high-level language. In so doing, the user expects that a more precise tuning can be made even in the case of the development by a high-level language, and therefore it is required to control in detail the optimization strategy performed by the compiler.
Consequently, not conventional rough directives but a minute control is required, which designates ON/OFF and its degree for each category of the optimization by the compiler, and turns the optimization ON/OFF in a unit of variables and loop processing in a program.